<?php include('base.php')?>
<?php $this->template->startblock('main') ?>
<h2>角色资源分配（<?php echo $role_name?>）</h2>
<form action="<?php echo site_url();?>post/assignrole" method="post">
<input type="hidden" name="role_id" value="<?php echo $role_id?>"/>
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<?php foreach($pcarr as $value){?>
	<tr class="tr3">
		<td width="15%">
			<a style="cursor:pointer" onclick="CheckList('list<?php echo $value['pc_id']?>')"><?php echo $value['pc_name']?></a>
		</td>
		<td id="settings">
			<ul class="list2" id="list<?php echo $value['pc_id']?>"> 
<?php foreach($value['parr'] as $val){?>
				<li><input type="checkbox" name="roledb[]" value="<?php echo $val['p_id']?>" <?php if(in_array($val['p_id'],$rolepri)) echo 'checked'?>/> <?php echo $val['p_name']?></li>
<?php }?>
			</ul>
		</td>
	</tr>
<?php }?>
</table>
<br />
<center><input type="button" value="全 选" class="btn" onclick="CheckAll(this.form)"> <input type="submit" class="btn" value="提 交"></center>
</form>
<?php $this->template->endblock() ?>